Hệ thống quản lý hàng tồn kho trong php

1 -- phpMyAdmin SQL Dump
2 -- version
4.5.1
3 -- http:
//www.phpmyadmin.net
4 --
5 -- Host:
127.0.0.1
6 -- Generation Time: Jan
12, 2019 at 09:57 AM
7 -- Server version:
10.1.13-MariaDB
8 -- PHP Version:
7.0.8
9
10 SET SQL_MODE =
"NO_AUTO_VALUE_ON_ZERO";
11 SET time_zone =
"+00:00";
12
13
14 /*!
40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15 /*!
40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16 /*!
40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17 /*!
40101 SET NAMES utf8mb4 */;
18
19 --
20 -- Database: `inventorymanagement`
21 --
22
23 -- --------------------------------------------------------
24
25 --
26 -- Table structure
for table `catagory`
27 --
28
29 CREATE TABLE `catagory` (
30   `catagory_id`
int(20) NOT NULL,
31   `catagory_name` varchar(
30) NOT NULL,
32   `description` varchar(
200) NOT NULL
33 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
34
35 -- --------------------------------------------------------
36
37 --
38 -- Table structure
for table `order`
39 --
40
41 CREATE TABLE `order` (
42   `order_id`
int(20) NOT NULL,
43   `quantity`
int(10) NOT NULL,
44   `order_date` date NOT NULL,
45   `order_price`
int(10) NOT NULL
46 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
47
48 -- --------------------------------------------------------
49
50 --
51 -- Table structure
for table `product`
52 --
53
54 CREATE TABLE `product` (
55   `product_id`
int(20) NOT NULL,
56   `product_name` varchar(
30) NOT NULL,
57   `price`
float NOT NULL,
58   `quantity`
int(10) NOT NULL
59 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
60
61 --
62 -- Dumping data
for table `product`
63 --
64
65 INSERT INTO `product` (`product_id`, `product_name`, `price`, `quantity`) VALUES
66 (
4, 'lux', 12, 3);
67
68 -- --------------------------------------------------------
69
70 --
71 -- Table structure
for table `purchase`
72 --
73
74 CREATE TABLE `purchase` (
75   `purchase_id`
int(20) NOT NULL,
76   `product_id`
int(20) NOT NULL,
77   `Number_received`
int(10) NOT NULL,
78   `purchase_date` date NOT NULL
79 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
80
81 -- --------------------------------------------------------
82
83 --
84 -- Table structure
for table `register`
85 --
86
87 CREATE TABLE `register` (
88   `username` varchar(
20) NOT NULL,
89   `first_name` varchar(
30) NOT NULL,
90   `last_name` varchar(
30) NOT NULL,
91   `mobile`
int(15) NOT NULL,
92   `email` varchar(
30) NOT NULL,
93   `password_1` varchar(
50) NOT NULL
94 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
95
96 --
97 -- Dumping data
for table `register`
98 --
99
100 INSERT INTO `register` (`username`, `first_name`, `last_name`, `mobile`, `email`, `password_1`) VALUES
101 (
'frpartho', 'Partho', 'Bala', 1686998128, 'parthobala019@gmail.com', '827ccb0eea8a706c4c34a16891f84e7b');
102
103 -- --------------------------------------------------------
104
105 --
106 -- Table structure
for table `stock`
107 --
108
109 CREATE TABLE `stock` (
110   `stock_id`
int(20) NOT NULL,
111   `Stock_count`
int(10) NOT NULL,
112   `stock_min_count`
int(10) NOT NULL
113 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
114
115 --
116 -- Indexes
for dumped tables
117 --
118
119 --
120 -- Indexes
for table `catagory`
121 --
122 ALTER TABLE `catagory`
123   ADD PRIMARY KEY (`catagory_id`);
124
125 --
126 -- Indexes
for table `order`
127 --
128 ALTER TABLE `order`
129   ADD PRIMARY KEY (`order_id`);
130
131 --
132 -- Indexes
for table `product`
133 --
134 ALTER TABLE `product`
135   ADD PRIMARY KEY (`product_id`);
136
137 --
138 -- Indexes
for table `purchase`
139 --
140 ALTER TABLE `purchase`
141   ADD PRIMARY KEY (`purchase_id`);
142
143 --
144 -- Indexes
for table `register`
145 --
146 ALTER TABLE `register`
147   ADD PRIMARY KEY (`username`);
148
149 --
150 -- Indexes
for table `stock`
151 --
152 ALTER TABLE `stock`
153   ADD PRIMARY KEY (`stock_id`);
154
155 --
156 -- AUTO_INCREMENT
for dumped tables
157 --
158
159 --
160 -- AUTO_INCREMENT
for table `catagory`
161 --
162 ALTER TABLE `catagory`
163   MODIFY `catagory_id`
int(20) NOT NULL AUTO_INCREMENT;
164 --
165 -- AUTO_INCREMENT
for table `order`
166 --
167 ALTER TABLE `order`
168   MODIFY `order_id`
int(20) NOT NULL AUTO_INCREMENT;
169 --
170 -- AUTO_INCREMENT
for table `product`
171 --
172 ALTER TABLE `product`
173   MODIFY `product_id`
int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
174 --
175 -- AUTO_INCREMENT
for table `purchase`
176 --
177 ALTER TABLE `purchase`
178   MODIFY `purchase_id`
int(20) NOT NULL AUTO_INCREMENT;
179 --
180 -- AUTO_INCREMENT
for table `stock`
181 --
182 ALTER TABLE `stock`
183   MODIFY `stock_id`
int(20) NOT NULL AUTO_INCREMENT;
184 /*!
40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
185 /*!
40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
186 /*!
40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


Gõ tìm kiếm nhanh...